
<link rel="stylesheet" type="text/css" href="qy_css.css" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>产品展示页</title>
</head>

<body>
<center>
<?php include_once 'top.php'; ?>
<div class="changpin">
<div class="changpin_1">
<div class="biaoti">产品分类</div>
<div class="cpfr_02">
<ul>
<li><a href="productList.php?uid=<?php echo $uid;?>">所有产品</a></li>
<?php
$type = getParameter("type");
if($type!="")
  $condition=" and t2.type=$type";
 $midtypeList = $db->executeQuery("select t.* from stufftypes t,stuffs t2 where  t2.type=t.id and t2.uid='$uid' ".$condition." group by t.name ");
    while($row2 = mysql_fetch_assoc($midtypeList))
    {

    $midtype = getRow($row2, "name");
?>
<li><a href="productList.php?uid=<?php echo $blogid;?>&type=<?php echo getRow($row2, "id");?>"><?php echo $midtype;?></a></li>

<?php } ?>
</ul>
</div>
</div>
<div class="changpin_2">
<div class="biaoti">产品展示</div>
<div class="cprr">
<ul>
  <?php

    $type = getParameter("type");

      @$page=$_GET["page"];
if($page=="")
{$page=1;}
if(is_numeric($page))
{

$pageobj = new Page($db);
$pageobj->setPageSize(24);
$pageobj->setPage($page);

if($type!="")
    $strType="and t2.type='$type'";
$rownum = $pageobj->getRowNum("select t2.* from users t,stuffs t2 where t.id=t2.uid and t.id='$uid' ".$strType);
$listResult = $pageobj->getListResult("select t2.* from users t,stuffs t2 where t.id=t2.uid and t.id='$uid' ".$strType);

 while ($row = mysql_fetch_assoc($listResult))
    {
        $id = getRow($row, "id");
          $title = getRow($row, "name");
          $file = getRow($row,"pic");
          if($file=="")
              $file="../../common/images/nopic.jpg";
          else
              $file="../../common/uploads/".$file;

    ?>
<li><a href="productView.jsp?uid=<?php echo $uid;?>&proid=<?php echo $id;?>"><img src="<?php echo $file;?>" width="105" height="110"></a><br/><?php echo $title;?></li>

<?php } }?>
</ul>
</div>
<div style="width:100%; height:20px; line-height:20px; text-align:center;"> <?php      $pageobj->printHtml("&type=$type");?></div>
</div>
</div>
<?php include_once 'bottom.php'; ?>
</center>
</body>
</html>